import java.util.ArrayList;


public class Main {
    public static void main(String[] args) {
        String s = "abc dvnsn dfibn ondv";
        String[] sc = s.split(" ");
        for(String s1:sc){
            System.out.println(s1);
        }
    }
    public static void main4(String[] args) {
        String s = "abcaba bnb abcn";
        String s1 = s.replace("ab","nb");
        System.out.println(s1);
    }
    public static void main3(String[] args) {
        String s1 = "this is index of example";
        int index1 = s1.indexOf("is");
        int index2 = s1.indexOf("index");
        System.out.println(index1+" "+index2);
        int index3 = s1.indexOf("is",4);
        System.out.println(index3);
        int index5 = s1.indexOf('s');
        System.out.println(index5);
    }
    public static void main2(String[] args) {


                ArrayList<String> list  = new ArrayList<>();
                list.add("hello");
                list.add("hi");
                System.out.println(list.contains("niu"));

    }
    public static void main1(String[] args) {
        String s1 = new String("abcd");
        String s2 = "abcf";
        System.out.println(s1.compareTo(s2));
    }
}